﻿using System;

namespace BizElements.Core
{
    /// <summary>Enumeration of supported (built-in) relational database management systems.</summary>
    [Serializable]
    public enum DbmsType
    {
        #region Built-in DBMSs.

        /// <summary>SQL Server 7. Different AUTO IDENTITY retrieval than newer versions.</summary>
        SqlServer_7,

        /// <summary>SQL Server 2000.</summary>
        SqlServer_2000,

        /// <summary>SQL Server 2005. Optimized hierarchical queries using recursive CTEs (WITH clause) and bulk inserts using BPC.</summary>
        SqlServer_2005,

        /// <summary>SQL Server 2008 or newer. Same as SQL Server 2005.</summary>
        SqlServer_2008,

        /// <summary>Oracle 9i. Same as Oracle 10g and 11g.</summary>
        Oracle_9i,

        /// <summary>Oracle 10g. Same as Oracle 9i and 11g.</summary>
        Oracle_10g,

        /// <summary>Oracle 11g or newer. Same as Oracle 9i and 10g.</summary>
        Oracle_11g,

        /// <summary>Generic ODBC. TOP is not supported. Auto-incremented fields are not supported.</summary>
        OdbcGeneric,

        /// <summary>Generic OLE DB. TOP is not supported. Auto-incremented fields are not supported.</summary>
        OleGeneric,

        /// <summary>MySQL 5.0 or newer with InnoDB or MyISAM engine. Hierarchical updates, ie. IEntityDAO.UpdateTree() methods, are not supported.</summary>
        MySql_5,

        /// <summary>PostgreSQL 9.0 or newer. Currently, SERIAL data-type must be used for auto-incremented fields. Stand-alone sequences are not supported in INSERT statement.</summary>
        PostgreSql_9,

        /// <summary>Firebird 2.1 or newer. Currently, GENERATORS and TRIGGERS must be used for auto-incremented fields. Stand-alone sequences are not supported in INSERT statement.</summary>
        Firebird_2,

        /// <summary>SQLite 3.0 or newer.</summary>
        SQLite_3,

        /// <summary>SQL Server Compact 4.0 or newer. SQL CE doesn't support subqueries in SELECT list.</summary>
        SqlServerCe_4,

        /// <summary>IBM DB2 9.0 or newer. Currently, IDENTITY columns must be used for auto-incremented fields. Stand-alone sequences are not supported in INSERT statement.</summary>
        DB2_9,

        #endregion

        /// <summary>Custom, not built-in, provider. Must be manually configured in application's config file.</summary>
        /// <remarks>It is possible to register a custom provider. E.g.
        /// <code>
        /// &lt;add key="BizElements.Core.DbmsComponentProviderAssembly.Custom" value="BizElements.Informix"/&gt;
        /// &lt;add key="BizElements.Core.DbmsComponentProviderClass.Custom" value="BizElements.Informix.InformixComponentProvider"/&gt;
        /// </code>
        /// </remarks>
        Custom
    }
}